package work.mediway.performance;

import com.mediway.hos.security.config.SecurityConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.scheduling.annotation.EnableAsync;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;

/**
 * @author chenshuaibo <3249274507@qq.com>
 * @description
 * @create 2024/11/15 10:42
 */
@EnableSwagger2WebMvc
@ComponentScan(basePackages = {"work.mediway", "com.mediway"},
        excludeFilters = {@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE,
                value = {
                        SecurityConfig.class,
                        com.mediway.hos.base.config.SwaggerConfig.class
                })
        })
// 指定要扫描的Mapper类的包的路径

@MapperScan({"work.mediway.performance.mapper.**"})
@SpringBootApplication
@EnableAsync
public class PerformanceApplication extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(PerformanceApplication.class);
    }
    public static void main(String[] args) {
        SpringApplication.run(PerformanceApplication.class, args);
    }
}
